﻿/*****
**作者：常亮
**日期:2009-11-18
**功能:所有后台表的映射
******/


/***
**映射后台用户对象
**
***/ 
var MapAdmin_Users=function(xmlDoc)
{     
    var obj=new Object();            
    var k=0;    
    var rootObj = xmlDoc.responseXML.documentElement;
    if(rootObj!=null)
    {        
        obj.UserID= GetXmlData(rootObj,"UserID");
        obj.UserName=GetXmlData(rootObj,"UserName");
        obj.Password=GetXmlData(rootObj,"Password");
        obj.DisplayName=GetXmlData(rootObj,"DisplayName");
        obj.DeptID=GetXmlData(rootObj,"DeptID");
        obj.Address=GetXmlData(rootObj,"Address");
        obj.OfficePhone=GetXmlData(rootObj,"OfficePhone");
        obj.MobilePhone=GetXmlData(rootObj,"MobilePhone");
        obj.PasswordNote=GetXmlData(rootObj,"PasswordNote");
        obj.Remark=GetXmlData(rootObj,"Remark");
        obj.LoginAccout=GetXmlData(rootObj,"LoginAccout");
        obj.LastLoginIP=GetXmlData(rootObj,"LastLoginIP");
        obj.LastLoginDate=GetXmlData(rootObj,"LastLoginDate");
        obj.UserState=GetXmlData(rootObj,"UserState");
    }
    return obj;
};
//得到文章内容
var Mapcontent = function(xmlDoc) {

var obj = new Object();
var k = 0;
var rootObj = xmlDoc.responseXML.documentElement;
if (rootObj != null) {
    obj.Title = GetXmlData(rootObj, "Title");
    obj.Content = GetXmlData(rootObj, "Content");
    obj.ID = GetXmlData(rootObj, "ID");
    obj.DisPlayOrder = GetXmlData(rootObj, "DisPlayOrder");
    obj.HtmUrl = GetXmlData(rootObj, "HtmUrl");
    obj.SendTime = GetXmlData(rootObj, "SendTime");
    obj.ShenHe = GetXmlData(rootObj, "ShenHe");
    obj.Author = GetXmlData(rootObj, "Author");
    obj.Ztz = GetXmlData(rootObj, "Ztz");
    obj.ModelID = GetXmlData(rootObj, "ModelID");
    obj.ModelParentID = GetXmlData(rootObj, "ModelParentID");
    obj.ImgUrl = GetXmlData(rootObj, "ImgUrl");
    obj.ImgName = GetXmlData(rootObj, "ImgName");
    obj.FuJian = GetXmlData(rootObj, "Fujian");
    obj.FuJianName = GetXmlData(rootObj, "FujianName");

    obj.Gylb = GetXmlData(rootObj, "Gylb");
    obj.Gydz = GetXmlData(rootObj, "Gydz");
    obj.Cclx = GetXmlData(rootObj, "Cclx");
    obj.Zbdh = GetXmlData(rootObj, "Zbdh");
    obj.Zyzw = GetXmlData(rootObj, "Zyzw");

    obj.FT_JiaBin = GetXmlData(rootObj, "FT_JiaBin");
    obj.FT_JiaBin_JJ = GetXmlData(rootObj, "FT_JiaBin_JJ");
    obj.FT_StartTime = GetXmlData(rootObj, "FT_StartTime");
    obj.FT_EndTime = GetXmlData(rootObj, "FT_EndTime");
    
}
return obj;
};
/***
**映射用户列表
**
***/

var MapAdmin_Userss = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_Users");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object();
                    obj.UserID = GetXmlData(list[i], "UserID");
                    obj.UserName = GetXmlData(list[i], "UserName");
                    obj.Password = GetXmlData(list[i], "Password");
                    obj.DisplayName = GetXmlData(list[i], "DisplayName");
                    obj.DeptID = GetXmlData(list[i], "DeptID");
                    obj.Address = GetXmlData(list[i], "Address");
                    obj.OfficePhone = GetXmlData(list[i], "OfficePhone");
                    obj.MobilePhone = GetXmlData(list[i], "MobilePhone");
                    obj.PasswordNote = GetXmlData(list[i], "PasswordNote");
                    obj.Remark = GetXmlData(list[i], "Remark");
                    obj.LoginAccout = GetXmlData(list[i], "LoginAccout");
                    obj.LastLoginIP = GetXmlData(list[i], "LastLoginIP");
                    obj.LastLoginDate = GetXmlData(list[i], "LastLoginDate");
                    obj.UserState = GetXmlData(list[i], "UserState");
                    obj.RoleName = GetXmlData(list[i], "RoleName");
                    obj.RoleNames = GetXmlData(list[i], "RoleNames");
                    obj.SetShenHe = GetXmlData(list[i], "SetShenHe"); //新加
                    rs[k++] = obj;
                }
            }
        }
    }
    return rs;
};

/***
**映射角色列表
**
***/

var MapAdmin_Roles = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_Roles");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object();
                    obj.RoleID = GetXmlData(list[i], "RoleID");
                    obj.RoleName = GetXmlData(list[i], "RoleName");
                    obj.RoleDesc = GetXmlData(list[i], "RoleDesc");
                    rs[k++] = obj;
                }
            }
        }
    }
    return rs;
};

/***
**映射角色信息
**
***/

var MapAdmin_Roless = function(xmlDoc) {
var obj = new Object();
var k = 0;
var rootObj = xmlDoc.responseXML.documentElement;
if (rootObj != null) {
    obj.RoleID = GetXmlData(rootObj, "RoleID");
    obj.RoleName = GetXmlData(rootObj, "RoleName");
    obj.RoleDesc = GetXmlData(rootObj, "RoleDesc"); 
}
return obj;
};


/***
**映射部门列表
**
***/
var MapAdmin_UserDept = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("DeptList");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.DeptID = GetXmlData(list[i], "DeptID");
                    obj.DeptName = GetXmlData(list[i], "DeptName");
                    obj.SortID = GetXmlData(list[i], "SortID");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};



/***
**映射栏目列表
**
***/
var MapModelList = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_Models");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ModelId = GetXmlData(list[i], "ModelId");
                    obj.ModelName = GetXmlData(list[i], "ModelName");
                    obj.ModelParentId = GetXmlData(list[i], "ModelParentId");
                    obj.OrderId = GetXmlData(list[i], "OrderId");
                    obj.MEnglishName = GetXmlData(list[i], "MENglishName");
                    obj.ZT = GetXmlData(list[i], "ZT");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};

/***
**映射指定栏目
**
***/
var MapModel = function(xmlDoc) {
    var obj = new Object();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        obj.ModelId = GetXmlData(rootObj, "ModelId");
        obj.ModelName = GetXmlData(rootObj, "ModelName");
        obj.ModelParentId = GetXmlData(rootObj, "ModelParentId");
        obj.OrderId = GetXmlData(rootObj, "OrderId");
        obj.MEnglishName = GetXmlData(rootObj, "MENglishName");
        obj.ModelPath = GetXmlData(rootObj, "ModelPath");
        obj.ZT = GetXmlData(rootObj, "ZT");
        obj.ImgUrl = GetXmlData(rootObj, "ImgUrl");
        obj.HttpUrl = GetXmlData(rootObj, "HttpUrl");
        obj.imgwh = GetXmlData(rootObj, "ImgWh");
    }
    return obj;
};
/***
**映射信息列表
***/
var MapNewsList = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_Contents");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ID = GetXmlData(list[i], "ID");
                    obj.Title = GetXmlData(list[i], "Title");
                    obj.Contents = GetXmlData(list[i], "Contents");
                    obj.Account = GetXmlData(list[i], "Account");
                    obj.ModelID = GetXmlData(list[i], "ModelId");
                    obj.ModelParentID = GetXmlData(list[i], "ModelParentID");
                    obj.SendTime = GetXmlData(list[i], "SendTime");
                    obj.HtmUrl = GetXmlData(list[i], "HtmUrl");
                    obj.FuJian = GetXmlData(list[i], "FuJian");
                    obj.Hit = GetXmlData(list[i], "Hit");
                    obj.DisPlayOrder = GetXmlData(list[i], "DisPlayOrder");
                    obj.ShenHe = GetXmlData(list[i], "ShenHe");
                    obj.HtmUrl = GetXmlData(list[i], "HtmUrl");
                    obj.PicFlg = GetXmlData(list[i], "PicFlg");
                    obj.TopLeading = GetXmlData(list[i], "TopLeading");
                    obj.TopPlayLeading = GetXmlData(list[i], "TopPlayLeading"); //视频头条
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};
/***
**映射友情链接栏目
**
***/
var MapYQLJ = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("YQLJ");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.Id = GetXmlData(list[i], "Id");
                    obj.SendTime = GetXmlData(list[i], "SendTime");
                    obj.ModuleName = GetXmlData(list[i], "ModuleName");
                    obj.ShenHe = GetXmlData(list[i], "ShenHe");
                    obj.NavigateUrl = GetXmlData(list[i], "NavigateUrl");
                    obj.DisplayOrder = GetXmlData(list[i], "DisplayOrder");
                    obj.parentid = GetXmlData(list[i], "parentid");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};

/***
**映射网上调查栏目
**
***/
var MapDiaoCha = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("DiaoCha");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.Id = GetXmlData(list[i], "Id");
                    obj.question_item = GetXmlData(list[i], "question_item");
                    obj.start_date = GetXmlData(list[i], "start_date");
                    obj.end_date = GetXmlData(list[i], "end_date");
                    obj.type = GetXmlData(list[i], "type");
                    obj.active = GetXmlData(list[i], "active");
                    obj.SendTime = GetXmlData(list[i], "SendTime");
                    obj.ShenHe = GetXmlData(list[i], "ShenHe");
                    obj.DisplayOrder = GetXmlData(list[i], "DisplayOrder");
                    obj.parentid = GetXmlData(list[i], "parentid");
                    obj.num = GetXmlData(list[i], "num");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};

/***
**廉政资料下载栏目
**
***/
var MapLZZLXZ = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("LZZLXZ");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.Id = GetXmlData(list[i], "Id");
                    obj.UserAccount = GetXmlData(list[i], "UserAccount");
                    obj.UserName = GetXmlData(list[i], "UserName");
                    obj.Name = GetXmlData(list[i], "Name");
                    obj.Name1 = GetXmlData(list[i], "Name1");
                    obj.kuozhanming = GetXmlData(list[i], "kuozhanming");
                    obj.url = GetXmlData(list[i], "url");
                    obj.length = GetXmlData(list[i], "length");
                    obj.CreateDate = GetXmlData(list[i], "CreateDate");
                    obj.ShenHe = GetXmlData(list[i], "ShenHe");
                    obj.num = GetXmlData(list[i], "num");
                    obj.DisPlayOrder = GetXmlData(list[i], "DisPlayOrder");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};
/***
**映射互动交流信息列表
***/
var MapHdjlList = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_Hdjl");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ID = GetXmlData(list[i], "Id");
                    obj.UserName = GetXmlData(list[i], "UserName");
                    obj.UserContents = GetXmlData(list[i], "UserContents");
                    obj.UserDept = GetXmlData(list[i], "UserDept");
                    obj.UserMail = GetXmlData(list[i], "UserMail");
                    obj.UserOPen = GetXmlData(list[i], "UserOPen");
                    obj.UserTel = GetXmlData(list[i], "UserTel");
                    obj.Type = GetXmlData(list[i], "Type");
                    obj.SendTime = GetXmlData(list[i], "SendTime");
                    obj.Contents = GetXmlData(list[i], "Contents");
                    obj.AnswerTime = GetXmlData(list[i], "AnswerTime");
                    obj.UserTitle = GetXmlData(list[i], "UserTitle");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};

/***
**映射互动交流对象
***/
var MapHdjl = function(xmlDoc) {
    var obj = new Object();
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        obj.ID = GetXmlData(rootObj, "Id");
        obj.UserName = GetXmlData(rootObj, "UserName");
        obj.UserContents = GetXmlData(rootObj, "UserContents");
        obj.UserDept = GetXmlData(rootObj, "UserDept");
        obj.UserMail = GetXmlData(rootObj, "UserMail");
        obj.UserOPen = GetXmlData(rootObj, "UserOPen");
        obj.UserTel = GetXmlData(rootObj, "UserTel");
        obj.Type = GetXmlData(rootObj, "Type");
        obj.SendTime = GetXmlData(rootObj, "SendTime");
        obj.Contents = GetXmlData(rootObj, "Contents");
        obj.AnswerTime = GetXmlData(rootObj, "AnswerTime");
    }
    return obj;
};
/***
**映射投诉举报信息列表
***/
var MapTsjbList = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_TSJB");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ID = GetXmlData(list[i], "ID");
                    obj.UserTitle = GetXmlData(list[i], "Title");
                    obj.UserDept = GetXmlData(list[i], "Dept");
                    obj.UserTel = GetXmlData(list[i], "Tel");
                    obj.UserMail = GetXmlData(list[i], "EMail");
                    obj.SendTime = GetXmlData(list[i], "SendTime");
                    obj.Flag = GetXmlData(list[i], "Html");
                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};
/***
**映射互动交流对象
***/
var MapTsjb = function(xmlDoc) {
    var obj = new Object();
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        obj.ID = GetXmlData(rootObj, "ID");
        obj.UserTitle = GetXmlData(rootObj, "Title");
        obj.UserName = GetXmlData(rootObj, "Name");
        obj.UserContents = GetXmlData(rootObj, "Content");
        obj.UserDept = GetXmlData(rootObj, "Dept");
        obj.UserMail = GetXmlData(rootObj, "EMail");
        obj.UserTel = GetXmlData(rootObj, "Tel");
        obj.SendTime = GetXmlData(rootObj, "SendTime");
        obj.Flag = GetXmlData(rootObj, "Html");
    }
    return obj;
};
/***
**政府发文信息列表
***/
var ZffwMapNewsList = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Admin_ZffwContents");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ID = GetXmlData(list[i], "ID");
                    obj.Title = GetXmlData(list[i], "Title");
                    obj.Contents = GetXmlData(list[i], "Contents");
                    obj.Account = GetXmlData(list[i], "Account");
                    obj.ModelID = GetXmlData(list[i], "ModelId");
                    obj.ModelParentID = GetXmlData(list[i], "ModelParentID");
                    obj.SendTime = GetXmlData(list[i], "AddTime");
                    obj.HtmUrl = GetXmlData(list[i], "HtmUrl");
                    obj.Hit = GetXmlData(list[i], "Hit");
                    obj.DisPlayOrder = GetXmlData(list[i], "DisPlayOrder");
                    obj.TopLeading = GetXmlData(list[i], "TopLeading");
                    obj.ShenHe = GetXmlData(list[i], "ShenHe");

                    rs[k++] = obj;
                }

            }
        }
    }
    return rs;
};
//得到文章内容
var Mapcontents = function(xmlDoc) {

    var obj = new Object();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        obj.Title = GetXmlData(rootObj, "Title");
        obj.Content = GetXmlData(rootObj, "Content");
        obj.ID = GetXmlData(rootObj, "ID");
        obj.Fujian = GetXmlData(rootObj, "Fujian");
        obj.ImgUrl = GetXmlData(rootObj, "ImgUrl");
        obj.SendTime = GetXmlData(rootObj, "SendTime");
        obj.HtmUrl = GetXmlData(rootObj, "HtmUrl");
        obj.Account = GetXmlData(rootObj, "Account");
        obj.EAccount = GetXmlData(rootObj, "EAccount");
        obj.DeptP = GetXmlData(rootObj, "DeptP");
        obj.DeptS = GetXmlData(rootObj, "DeptS");
        obj.Wjt = GetXmlData(rootObj, "Wjt");
        obj.Wjbh = GetXmlData(rootObj, "Wjbh");
        obj.Ztc = GetXmlData(rootObj, "Ztc");
        obj.Fwsj = GetXmlData(rootObj, "Fwsj");
        obj.Fwdw = GetXmlData(rootObj, "Fwdw");
        obj.Gklx = GetXmlData(rootObj, "Gklx");
    }
    return obj;
};


/***
**2011-03-17映射栏目列表
**
***/
var MapSendModel = function(xmlDoc) {
    var rs = new Array();
    var k = 0;
    var rootObj = xmlDoc.responseXML.documentElement;
    if (rootObj != null) {
        var list = rootObj.getElementsByTagName("Model");
        if (list != null && list.length > 0) {
            for (var i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    var obj = new Object(); //绑定各个字段
                    obj.ModelValue = GetXmlData(list[i], "ModelValue");
                    obj.ModelName = GetXmlData(list[i], "ModelName");
                    rs[k++] = obj;
                }
            }
        }
    }
    return rs;
};